<%
  #File:    /app/views/layouts/application.rhtml
  #Author:  Andrew Stone
  #Created: 07.21.2006
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
  <head>
    <title>TeamStaff Intranet</title>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>

    <%=stylesheet_link_tag('site')%>
    <%=stylesheet_link_tag('indigo')%>
    <%=stylesheet_link_tag('forms')%>
    <%=stylesheet_link_tag('spiffy')%>
    <%=stylesheet_link_tag('orgchart')%>
    <%=stylesheet_link_tag('menu')%>
    <%=stylesheet_link_tag('drag')%>
    <%=stylesheet_link_tag('job')%>
    <%=stylesheet_link_tag('modules')%>

    <%
      #Various functions
    %>
    <%=javascript_include_tag("core")%>
    <%
      #Rails specific javascripts
    %>
    <%=javascript_include_tag(:defaults)%>
    <% 
      if @content_for_page_scripts %>
        <%=@content_for_page_scripts%>
    <% 
      end %>

    <!--[if lt IE 7]>
      <script src="/javascripts/ie7/ie7-standard-p.js" type="text/javascript"> </script>
    <![endif]-->

    <script type="text/javascript">
      function addLoadEvent(func) {
        var oldonload = window.onload;
        if (typeof window.onload != 'function') {
          window.onload = func;
        } else {
          window.onload = function() {
          oldonload();
          func();
          }
        }
      }//end addLoadEvent


      addLoadEvent(function () { set_focus(); } );
    </script>
  </head>
  <body>
    <div id="site"> 
      <div id="header">
        <div id="header_left">
          <%= image_tag("topleft.png")%>
        </div>
		    <%=generate_menu%>
      </div><!-- end header div -->


      <div id="main">
        <div id="content_wrapper">
				  <div id="content">
            <noscript>
              <div id="javascript_message">
                Javascript is required to use this site.<br/>Please change your browser settings to enable javascript.
              </div>
            </noscript>
					  <%=flash_message%>
					  <%=yield%>
				  </div>
			  </div>
      </div><!-- end main div -->

      <div style="clear:both; height: 100%">&nbsp;</div>

      <div id="footer">
        <a target="top" href="http://www.teamstaff.com">TeamStaff.com</a> 
        <%
          footer_links = Page.find(:all, :conditions => "show_in_footer = true") 
          footer_links.each do |fl|
            link = dynamic_secure_link_to(fl)
            if link.strip.length > 1
        %>
              &nbsp;|&nbsp; <%=link%>

        <%
            end
          end

        %>
        <br/>
        <span id="copyright">&copy; Copyright 2006. All Rights Reserved</span>
      </div><!-- end footer div -->
    </div><!-- end site div -->
  </body>
</html>


